library IEEE;
 use ieee.std_logic_1164.all;
 use ieee.std_logic_arith.all;
 use ieee.std_logic_unsigned.all;

library work;
 use work.router_pack.all;

-------------------------------------------------------------------------

package env_pack is
    
   -- Environment Constants --
   
   -- This is the number of routers that will be generated in each raw and each column.
   constant e_routers_per_raw_count_c : integer := 2;
   
   constant e_top_port_c              : integer := 2;
   constant e_right_port_c            : integer := 3;
   constant e_bottom_port_c           : integer := 0;
   constant e_left_port_c             : integer := 1;
   constant e_module_port_c           : integer := 4;
   
   constant e_base_clock_wait_c       : time := 10ps; -- in pico sec.
   constant e_base_clock_phase_ps_c			: integer := 10;
   constant e_clock_mult_width_c      : integer := 3;
    
   -- Module Constants --
   
   constant e_cycle_counter_width_c   : integer := 32;
 
   -- this is the width of the X/Y Router coordinates in the environment
   constant e_coord_position_width_c  : integer := 1;
   
   constant e_flit_data_width_c       : integer := flit_width_con - 2;
   constant e_flit_data_msb_c         : integer := e_flit_data_width_c - 1;
   
   -- need to make sure that this value stays a multiplication of e_flit_data_width_c (8)
   constant e_packet_id_width_c       : integer := e_flit_data_width_c*2;
   constant e_packet_counter_width_c	 : integer := e_packet_id_width_c - e_coord_position_width_c*2;
    
   constant e_head_type_c             : integer := 1; -- "01";
   constant e_body_type_c             : integer := 0; -- "00";
   constant e_tail_type_c             : integer := 2; -- "10";
   
   constant loger_type_injector 	     : std_logic:= '1';
   constant loger_type_collector 	    : std_logic:= '0';
   
   constant inj_wait_max_width_c      : integer := 20;
   
   constant inj_rand_base_seed1_c      : integer := 1234; --105611;
   constant inj_rand_base_seed2_c      : integer := 2010456; --5231;
   
   constant e_seed_width_c				      : integer := 16;
   
   constant e_workload_width_c        : integer := 5;
   constant e_workload_R00_c         	: integer := 5;
   constant e_workload_R01_c         	: integer := 5;
   constant e_workload_R10_c         	: integer := 5;
   constant e_workload_R11_c         	: integer := 5;
   
   constant e_clock_mult_R00_c				    : integer := 1;
   constant e_clock_mult_R01_c				    : integer := 4;
   constant e_clock_mult_R10_c				    : integer := 3;
   constant e_clock_mult_R11_c				    : integer := 2;
   
   constant e_max_sl_c                : integer := 3;
   constant e_max_vc_c                : integer := 1;
   
   -- Packet Size is in flits (including the Head flit)
   -- Minimum Packet size is 2 flits
   constant e_packet_size_width_c     : integer := 10;
   constant e_min_flit_count_c        : integer := 3;
   constant e_max_flit_count_c        : integer := 1023;
   
   constant e_small_size_max_flit_cout_c	: integer := 15;
   constant e_medium_size_max_flit_cout_c	: integer := 127;
   
   constant e_first_packet_wait_mean_c : integer := 20;
    
end env_pack;

-------------------------------------------------------------------------

package body env_pack is
    
end env_pack;
